package com.itheima.reggie.common;


/**
 * 获取线程id
 */
public class BaseContext {

    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static Long getCurrentId(){
        return threadLocal.get();
    }

    public static void setId(Long id){
        threadLocal.set(id);
    }
}
